import request from '@/utils/request'

export default{
    getList(){
        return request(
            {
               url:'/category/list' ,
               method:'get',
               baseURL:'http://localhost:9002/category/list',
            }
        )
    },
    //获取分类级联选择器
    getOptions(){
        return request({
            url:`/category/cascader`,
            method:'get',
            baseURL:'http://api.exam.com/api/paper/'
        })
    },

    queryClassesListBySid(tid){
        return request({
            url: `teacher/list/${tid}`,
            method: 'get',
            baseURL:'http://api.exam.com/api/classes/'
        })
    },

    queryStuListByCid(cid){
        return request({
            url: `teacher/stulist/${cid}`,
            method: 'get',
            baseURL:'http://api.exam.com/api/classes/'
        })
    },

    creatClasses(tid,cname){
        return request({
            url: `classes`,
            method: 'post',
            baseURL:'http://api.exam.com/api/classes/',
            data:{tid,cname}
        })
    },

    deleteClasses(cid){
        return request({
            url: `classes`,
            method: 'DELETE',
            baseURL:'http://api.exam.com/api/classes/',
            params:{"cid":cid}
        })
    }

}